<template>
	<!-- 门店资质 -->
	<view class="storeQualification-main">

		<view class="storeQualification-zz">
			<view class="storeQualification-zz-header">门店资质</view>
			<!-- 门店资质 -->
			<view class="clerkManage-options">
				<view class="clerkManage-option">
					<view class="option-item">
						<view class="option-item-icon">
							<uni-icons type="auth-filled" size="22"></uni-icons>
						</view>
						<view class="option-item-title">营业执照名称</view>
						<view class="option-item-icons">
							{{ storeInfo.business.name || '暂无' }}
						</view>
					</view>
					<view class="option-item">
						<view class="option-item-icon">
							<uni-icons type="paperplane-filled" size="22"></uni-icons>
						</view>
						<view class="option-item-title">社会统一信用代码</view>
						<view class="option-item-icons">
							{{ storeInfo.business.number || '暂无' }}
						</view>
					</view>
					<view class="option-item">
						<view class="option-item-icon">
							<uni-icons type="person-filled" size="22"></uni-icons>
						</view>
						<view class="option-item-title">法人身份证姓名</view>
						<view class="option-item-icons">
							{{ storeInfo.idcard.name || '暂无' }}
						</view>
					</view>
					<view class="option-item">
						<view class="option-item-icon">
							<uni-icons type="locked-filled" size="22"></uni-icons>
						</view>
						<view class="option-item-title">法人身份证号</view>
						<view class="option-item-icons">
							{{ storeInfo.idcard.idcard || '暂无' }}
						</view>
					</view>
				</view>
			</view>
			<view class="storeQualification-zz-header">营业执照</view>
			<view class="storeQualification-zz-images">
				<image :src="imageUrls(storeInfo.business.image)" mode="widthFix" class="images"></image>
			</view>
		</view>
	</view>
</template>

<script>
import { imageUrl } from '../../../utils/tools';
import { flashManageInfo } from '../../../api/flashManage/index.js';
export default {
	data() {
		return {
			storeInfo: {}
		};
	},
	onLoad() {
		this.getflashManageInfo();
	},
	methods: {
		// 门店信息获取
		async getflashManageInfo() {
			try {
				const resData = await flashManageInfo({
					type: this.$store.state.storeType
				});
				this.storeInfo = resData.data;
			} catch (e) {
				throw Error(e);
			}
		},
		
		// 图片路径拼接
		imageUrls(fileUrl) {
			return imageUrl(fileUrl)
		}
	}
};
</script>

<style scoped lang="scss">
.storeQualification-main {
	box-sizing: border-box;
	padding: 30rpx;
	.storeQualification-zz {
		margin-bottom: 30rpx;
		padding-bottom: 30rpx;
		border-bottom: 1px #f3f3f3 solid;
		.storeQualification-zz-header {
			font-size: 28rpx;
			font-weight: bold;
			height: 60rpx;
		}
		.clerkManage-options {
			margin-bottom: 30rpx;
			.clerkManage-option {
				background-color: #fff;
				border-radius: 24rpx;
				padding: 30rpx;
				padding-top: 0px;
				.clerkManage-option-header {
					margin-bottom: 20rpx;
					font-weight: bold;
				}
				.storeMap {
					margin-top: 20rpx;
				}
				.storeAddress {
					display: flex;
					align-items: center;
					height: 80rpx;
					font-size: 24rpx;
					margin-top: 20rpx;
					color: #999;
				}
				.option-item {
					height: 100rpx;
					display: flex;
					align-items: center;
					border-bottom: 1px #f3f3f3 solid;
					font-size: 28rpx;
					.option-item-icon {
						width: 55rpx;
					}
					.option-item-title {
						flex: 1;
					}
					.option-item-icons {
						text-align: right;
						font-size: 24rpx;
						color: #999;
					}
				}
			}
		}
	}
}
</style>
